home *** CD-ROM | disk | FTP | other *** search
- OPT DOSONLY
-
- // A small example for using the identify.library. (C) 1997 by Richard Körber -- All Rights Reserved
- // Converted by DMX in 2002.
-
- MODULE 'exec/memory','libraries/identify','identify','libraries/configregs','libraries/configvars','utility/tagitem'
-
- DEF IdentifyBase
-
- PROC main()(INT)
-
- IF IdentifyBase:=OpenLibrary('identify.library',6)
- DEF expans=NIL:PTR TO ConfigDev,counter=0:UW,size:UW,unit:UW
- DEF manuf[IDENTIFYBUFLEN]:CHAR,prod[IDENTIFYBUFLEN]:CHAR,pclass[IDENTIFYBUFLEN]:CHAR
- PrintF('Nr Address Size Description\n'+
- '----------------------------------------------------------\n');
- WHILEN IdExpansionTags(
- IDTAG_ManufStr ,&manuf,
- IDTAG_ProdStr ,&prod,
- IDTAG_ClassStr ,&pclass,
- IDTAG_Expansion,&expans,
- TAG_DONE)
- unit:="K"
- size:=expans.BoardSize>>10
- IF size>=1024
- unit:="M"
- size := size>>10
- ENDIF
- PrintF('\z\d[2] \z\h[8] \z\d[3]\c \s \s (\s)\n',
- ++counter,
- expans.BoardAddr, size, unit,
- prod, pclass, manuf);
- ENDWHILE
- CloseLibrary(IdentifyBase)
- ENDIF
- RETURN 0
- ENDPROC
-